﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Smart.Common
{
    public class RibbonChangedEventArgs : EventArgs
    {
        private MenuButton m_ribbon;

        public RibbonChangedEventArgs(MenuButton mRibbon)
        {
            this.m_ribbon = mRibbon;
        }

        public MenuButton Ribbon
        {
            get
            {
                return this.m_ribbon;
            }
        }
    }
    public delegate void RibbonChangedEventHander(object sender, RibbonChangedEventArgs e);

    public class RowClickEventArgs
    {
        private int m_ColumnIndex;
        private string m_FieldName;
        private int m_RowIndex;

        public RowClickEventArgs()
        {
            this.m_RowIndex = -1;
            this.m_ColumnIndex = -1;
            this.m_FieldName = "";
        }

        public RowClickEventArgs(int RowIndex, int ColumnIndex)
        {
            this.m_RowIndex = RowIndex;
            this.m_ColumnIndex = ColumnIndex;
            this.m_FieldName = "";
        }

        public RowClickEventArgs(int RowIndex, string FieldName)
        {
            this.m_RowIndex = RowIndex;
            this.m_ColumnIndex = -1;
            this.m_FieldName = FieldName;
        }

        public RowClickEventArgs(int RowIndex, int ColumnIndex, string FieldName)
        {
            this.m_RowIndex = RowIndex;
            this.m_ColumnIndex = ColumnIndex;
            this.m_FieldName = FieldName;
        }

        public void Reset()
        {
            this.m_RowIndex = -1;
            this.m_ColumnIndex = -1;
            this.m_FieldName = "";
        }

        public void Set(int RowIndex, int ColumnIndex, string FieldName)
        {
            this.m_RowIndex = RowIndex;
            this.m_ColumnIndex = ColumnIndex;
            this.m_FieldName = FieldName;
        }

        public int ColumnIndex
        {
            get
            {
                return this.m_ColumnIndex;
            }
            set
            {
                this.m_ColumnIndex = value;
            }
        }

        public string FieldName
        {
            get
            {
                return this.m_FieldName;
            }
            set
            {
                this.m_FieldName = value;
            }
        }

        public int RowIndex
        {
            get
            {
                return this.m_RowIndex;
            }
            set
            {
                this.m_RowIndex = value;
            }
        }
    }
    public delegate void RowClickEventHander(object sender, RowClickEventArgs e);

    public class SaveChangedEventArgs : EventArgs
    {
        private bool m_notsave;

        public bool NotSave
        {
            get
            {
                return this.m_notsave;
            }
        }
    }
    public delegate void SaveChangedEventHander(object sender, SaveChangedEventArgs e);

    public class SaveChangingEventArgs : EventArgs
    {
        private string m_caption;
        private int m_percent;

        public int Percent
        {
            get
            {
                return this.m_percent;
            }
        }

        public string Status
        {
            get
            {
                return this.m_caption;
            }
        }
    }
    public delegate void SaveChangingEventHander(object sender, SaveChangingEventArgs e);

    public class SaveCompleteEventArgs : EventArgs
    {
    }
    public delegate void SaveCompleteEventHander(object sender, SaveCompleteEventArgs e);

    public delegate void ButtonClickEventHander(object sender);
    public delegate void DeletedEventHander(object sender, RowClickEventArgs e);
    public delegate void ListKeyDownEventHander(object sender, KeyEventArgs key, RowClickEventArgs e);
}
